package academic.concordia.bankofquebec.managedbean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;

import academic.concordia.bankofquebec.bean.session.SessionData;

@ManagedBean(name="productCreationManagedBean")
@SessionScoped
public class ProductCreationManagedBean {
	
	@ManagedProperty(value="#{SessionData}")
	private SessionData sessionData;
	
	private static String CLIENT_CREATION = "client_creation";
	
	public String newOpeningCheckingsSavingsAccount(){
		sessionData.setNavigation("checkings_savings_account_opening");
		System.out.println("Opening navigation: " + sessionData.getNavigation());
		return CLIENT_CREATION;
	}
	
	public String newRequestCreditCard(){
		sessionData.setNavigation("credit_card_request");
		return CLIENT_CREATION;
	}
	
	public String newOpeningMutualFundsAccount(){
		sessionData.setNavigation("mutual_funds_opening");
		return CLIENT_CREATION;
	}
	
	public String newOpeningGIC(){
		sessionData.setNavigation("gic_opening");
		return CLIENT_CREATION;
	}

	public SessionData getSessionData() {
		return sessionData;
	}

	public void setSessionData(SessionData sessionData) {
		this.sessionData = sessionData;
	}
	
	

}
